# -*- coding: utf-8 -*-
# @Time         : 14:10 2025/2/26
# @Author       : Chris
# @Description  :
from typing import Optional, List

from .._models import BaseModel


class SkuItem(BaseModel):
    sku_id: int
    """管家SKU规格ID"""

    stock: int
    """SKU库存"""

    outer_id: Optional[str] = None
    """SKU商品编码"""

    price: Optional[int] = None
    """SKU售价（分）"""


class ProductEditStockParams(BaseModel):
    product_id: int
    """管家商品ID"""

    original_price: Optional[int] = None
    """商品原价（分）"""

    price: Optional[int] = None
    """商品售价（分）, 注意：多规格商品，必须是SKU其中一个金额"""

    sku_items: Optional[List[SkuItem]] = None
    """多规格库存, 注意：多规格商品时必填，按需传入需要同步的sku库存即可"""

    stock: Optional[int] = None
    """单规格库存, 注意：单规格商品时必填"""
